package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.YtBillManagement;
import com.ruoyi.system.mapper.YtBillManagementMapper;
import com.ruoyi.system.service.IYtBillManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 银行账单管理Service业务层处理
 *
 * @author magichaohao
 * @date 2021-05-24
 */
@Service
public class YtBillManagementServiceImpl implements IYtBillManagementService
{
    @Autowired
    private YtBillManagementMapper ytBillManagementMapper;

    /**
     * 查询银行账单管理
     *
     * @param billId 银行账单管理ID
     * @return 银行账单管理
     */
    @Override
    public YtBillManagement selectYtBillManagementById(Long billId)
    {
        return ytBillManagementMapper.selectYtBillManagementById(billId);
    }

    @Override
    public List<YtBillManagement> selectYtBillManagementById2(Long customerId) {
        return ytBillManagementMapper.selectYtBillManagementById2(customerId);
    }

    /**
     * 查询银行账单管理列表
     *
     * @param ytBillManagement 银行账单管理
     * @return 银行账单管理
     */
    @Override
    public List<YtBillManagement> selectYtBillManagementList(YtBillManagement ytBillManagement)
    {
        return ytBillManagementMapper.selectYtBillManagementList(ytBillManagement);
    }

    /**
     * 新增银行账单管理
     *
     * @param ytBillManagement 银行账单管理
     * @return 结果
     */
    @Override
    public int insertYtBillManagement(YtBillManagement ytBillManagement)
    {
        return ytBillManagementMapper.insertYtBillManagement(ytBillManagement);
    }

    /**
     * 修改银行账单管理
     *
     * @param ytBillManagement 银行账单管理
     * @return 结果
     */
    @Override
    public int updateYtBillManagement(YtBillManagement ytBillManagement)
    {
        return ytBillManagementMapper.updateYtBillManagement(ytBillManagement);
    }

    /**
     * 删除银行账单管理对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYtBillManagementByIds(String ids)
    {
        return ytBillManagementMapper.deleteYtBillManagementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除银行账单管理信息
     *
     * @param billId 银行账单管理ID
     * @return 结果
     */
    @Override
    public int deleteYtBillManagementById(Long billId)
    {
        return ytBillManagementMapper.deleteYtBillManagementById(billId);
    }
}
